package com.example.demo.factory.version1;


import java.util.Scanner;

/**
 * @author keyer
 * @Description : 描述
 * Created by cyd on 2021-05-24 14:04:20
 */
public class Calculator {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入数字A");
        double numberA = scanner.nextDouble();
        System.out.println("请输入数字B");
        double numberB = scanner.nextDouble();
        System.out.println("请输入操作符");
        String operate = scanner.next();

        double result = Operation.getResult(numberA, numberB, operate);
        System.out.println("结果为:" + result);
    }
}
